package com.mvc.common.session;

import java.io.Serializable;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**  
  * Session提供者 
  *  
  * 内容信息：  
  * 日期：2012-10-8  
  * Copyright 黑狼  Corporation 2012   
  * 版权所有  
  *  
  */ 
public interface SessionProvider {
	
	/**
	 * 获取session 里面的值
	 * session.getAttribute("");
	 * @param request
	 * @param name
	 * @return
	 */
	public Serializable getAttribute(HttpServletRequest request, String name);
    /**
     * 将一个对象放入session里面
     * session.setAttribute(name,value);
     * @param request
     * @param response
     * @param name
     * @param value
     */
	public void setAttribute(HttpServletRequest request,
			HttpServletResponse response, String name, Serializable value);

	public String getSessionId(HttpServletRequest request,
			HttpServletResponse response);
    
	public void logout(HttpServletRequest request, HttpServletResponse response);
}
